package qldc.pm.qlktcsdldc.service.persistence;

import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.ReferenceRegistry;
import com.liferay.portal.service.ServiceContext;

import qldc.pm.qlktcsdldc.model.NguoiDung;

import java.util.List;

/**
 * The persistence utility for the nguoi dung service. This utility wraps {@link NguoiDungPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author Brian Wing Shun Chan
 * @see NguoiDungPersistence
 * @see NguoiDungPersistenceImpl
 * @generated
 */
public class NguoiDungUtil {
    private static NguoiDungPersistence _persistence;

    /*
     * NOTE FOR DEVELOPERS:
     *
     * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
     */

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
     */
    public static void clearCache() {
        getPersistence().clearCache();
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
     */
    public static void clearCache(NguoiDung nguoiDung) {
        getPersistence().clearCache(nguoiDung);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
     */
    public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
        throws SystemException {
        return getPersistence().countWithDynamicQuery(dynamicQuery);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
     */
    public static List<NguoiDung> findWithDynamicQuery(
        DynamicQuery dynamicQuery) throws SystemException {
        return getPersistence().findWithDynamicQuery(dynamicQuery);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
     */
    public static List<NguoiDung> findWithDynamicQuery(
        DynamicQuery dynamicQuery, int start, int end)
        throws SystemException {
        return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
     */
    public static List<NguoiDung> findWithDynamicQuery(
        DynamicQuery dynamicQuery, int start, int end,
        OrderByComparator orderByComparator) throws SystemException {
        return getPersistence()
                   .findWithDynamicQuery(dynamicQuery, start, end,
            orderByComparator);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
     */
    public static NguoiDung update(NguoiDung nguoiDung)
        throws SystemException {
        return getPersistence().update(nguoiDung);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
     */
    public static NguoiDung update(NguoiDung nguoiDung,
        ServiceContext serviceContext) throws SystemException {
        return getPersistence().update(nguoiDung, serviceContext);
    }

    /**
    * Returns all the nguoi dungs where IDQLKT_NguoiDung = &#63;.
    *
    * @param IDQLKT_NguoiDung the i d q l k t_ nguoi dung
    * @return the matching nguoi dungs
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<qldc.pm.qlktcsdldc.model.NguoiDung> findByIDQLKT_NguoiDung(
        long IDQLKT_NguoiDung)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findByIDQLKT_NguoiDung(IDQLKT_NguoiDung);
    }

    /**
    * Returns a range of all the nguoi dungs where IDQLKT_NguoiDung = &#63;.
    *
    * <p>
    * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link qldc.pm.qlktcsdldc.model.impl.NguoiDungModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
    * </p>
    *
    * @param IDQLKT_NguoiDung the i d q l k t_ nguoi dung
    * @param start the lower bound of the range of nguoi dungs
    * @param end the upper bound of the range of nguoi dungs (not inclusive)
    * @return the range of matching nguoi dungs
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<qldc.pm.qlktcsdldc.model.NguoiDung> findByIDQLKT_NguoiDung(
        long IDQLKT_NguoiDung, int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByIDQLKT_NguoiDung(IDQLKT_NguoiDung, start, end);
    }

    /**
    * Returns an ordered range of all the nguoi dungs where IDQLKT_NguoiDung = &#63;.
    *
    * <p>
    * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link qldc.pm.qlktcsdldc.model.impl.NguoiDungModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
    * </p>
    *
    * @param IDQLKT_NguoiDung the i d q l k t_ nguoi dung
    * @param start the lower bound of the range of nguoi dungs
    * @param end the upper bound of the range of nguoi dungs (not inclusive)
    * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
    * @return the ordered range of matching nguoi dungs
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<qldc.pm.qlktcsdldc.model.NguoiDung> findByIDQLKT_NguoiDung(
        long IDQLKT_NguoiDung, int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByIDQLKT_NguoiDung(IDQLKT_NguoiDung, start, end,
            orderByComparator);
    }

    /**
    * Returns the first nguoi dung in the ordered set where IDQLKT_NguoiDung = &#63;.
    *
    * @param IDQLKT_NguoiDung the i d q l k t_ nguoi dung
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching nguoi dung
    * @throws qldc.pm.qlktcsdldc.NoSuchNguoiDungException if a matching nguoi dung could not be found
    * @throws SystemException if a system exception occurred
    */
    public static qldc.pm.qlktcsdldc.model.NguoiDung findByIDQLKT_NguoiDung_First(
        long IDQLKT_NguoiDung,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException,
            qldc.pm.qlktcsdldc.NoSuchNguoiDungException {
        return getPersistence()
                   .findByIDQLKT_NguoiDung_First(IDQLKT_NguoiDung,
            orderByComparator);
    }

    /**
    * Returns the first nguoi dung in the ordered set where IDQLKT_NguoiDung = &#63;.
    *
    * @param IDQLKT_NguoiDung the i d q l k t_ nguoi dung
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the first matching nguoi dung, or <code>null</code> if a matching nguoi dung could not be found
    * @throws SystemException if a system exception occurred
    */
    public static qldc.pm.qlktcsdldc.model.NguoiDung fetchByIDQLKT_NguoiDung_First(
        long IDQLKT_NguoiDung,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchByIDQLKT_NguoiDung_First(IDQLKT_NguoiDung,
            orderByComparator);
    }

    /**
    * Returns the last nguoi dung in the ordered set where IDQLKT_NguoiDung = &#63;.
    *
    * @param IDQLKT_NguoiDung the i d q l k t_ nguoi dung
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching nguoi dung
    * @throws qldc.pm.qlktcsdldc.NoSuchNguoiDungException if a matching nguoi dung could not be found
    * @throws SystemException if a system exception occurred
    */
    public static qldc.pm.qlktcsdldc.model.NguoiDung findByIDQLKT_NguoiDung_Last(
        long IDQLKT_NguoiDung,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException,
            qldc.pm.qlktcsdldc.NoSuchNguoiDungException {
        return getPersistence()
                   .findByIDQLKT_NguoiDung_Last(IDQLKT_NguoiDung,
            orderByComparator);
    }

    /**
    * Returns the last nguoi dung in the ordered set where IDQLKT_NguoiDung = &#63;.
    *
    * @param IDQLKT_NguoiDung the i d q l k t_ nguoi dung
    * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
    * @return the last matching nguoi dung, or <code>null</code> if a matching nguoi dung could not be found
    * @throws SystemException if a system exception occurred
    */
    public static qldc.pm.qlktcsdldc.model.NguoiDung fetchByIDQLKT_NguoiDung_Last(
        long IDQLKT_NguoiDung,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchByIDQLKT_NguoiDung_Last(IDQLKT_NguoiDung,
            orderByComparator);
    }

    /**
    * Removes all the nguoi dungs where IDQLKT_NguoiDung = &#63; from the database.
    *
    * @param IDQLKT_NguoiDung the i d q l k t_ nguoi dung
    * @throws SystemException if a system exception occurred
    */
    public static void removeByIDQLKT_NguoiDung(long IDQLKT_NguoiDung)
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence().removeByIDQLKT_NguoiDung(IDQLKT_NguoiDung);
    }

    /**
    * Returns the number of nguoi dungs where IDQLKT_NguoiDung = &#63;.
    *
    * @param IDQLKT_NguoiDung the i d q l k t_ nguoi dung
    * @return the number of matching nguoi dungs
    * @throws SystemException if a system exception occurred
    */
    public static int countByIDQLKT_NguoiDung(long IDQLKT_NguoiDung)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().countByIDQLKT_NguoiDung(IDQLKT_NguoiDung);
    }

    /**
    * Caches the nguoi dung in the entity cache if it is enabled.
    *
    * @param nguoiDung the nguoi dung
    */
    public static void cacheResult(qldc.pm.qlktcsdldc.model.NguoiDung nguoiDung) {
        getPersistence().cacheResult(nguoiDung);
    }

    /**
    * Caches the nguoi dungs in the entity cache if it is enabled.
    *
    * @param nguoiDungs the nguoi dungs
    */
    public static void cacheResult(
        java.util.List<qldc.pm.qlktcsdldc.model.NguoiDung> nguoiDungs) {
        getPersistence().cacheResult(nguoiDungs);
    }

    /**
    * Creates a new nguoi dung with the primary key. Does not add the nguoi dung to the database.
    *
    * @param IDQLKT_NguoiDung the primary key for the new nguoi dung
    * @return the new nguoi dung
    */
    public static qldc.pm.qlktcsdldc.model.NguoiDung create(
        long IDQLKT_NguoiDung) {
        return getPersistence().create(IDQLKT_NguoiDung);
    }

    /**
    * Removes the nguoi dung with the primary key from the database. Also notifies the appropriate model listeners.
    *
    * @param IDQLKT_NguoiDung the primary key of the nguoi dung
    * @return the nguoi dung that was removed
    * @throws qldc.pm.qlktcsdldc.NoSuchNguoiDungException if a nguoi dung with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public static qldc.pm.qlktcsdldc.model.NguoiDung remove(
        long IDQLKT_NguoiDung)
        throws com.liferay.portal.kernel.exception.SystemException,
            qldc.pm.qlktcsdldc.NoSuchNguoiDungException {
        return getPersistence().remove(IDQLKT_NguoiDung);
    }

    public static qldc.pm.qlktcsdldc.model.NguoiDung updateImpl(
        qldc.pm.qlktcsdldc.model.NguoiDung nguoiDung)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().updateImpl(nguoiDung);
    }

    /**
    * Returns the nguoi dung with the primary key or throws a {@link qldc.pm.qlktcsdldc.NoSuchNguoiDungException} if it could not be found.
    *
    * @param IDQLKT_NguoiDung the primary key of the nguoi dung
    * @return the nguoi dung
    * @throws qldc.pm.qlktcsdldc.NoSuchNguoiDungException if a nguoi dung with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public static qldc.pm.qlktcsdldc.model.NguoiDung findByPrimaryKey(
        long IDQLKT_NguoiDung)
        throws com.liferay.portal.kernel.exception.SystemException,
            qldc.pm.qlktcsdldc.NoSuchNguoiDungException {
        return getPersistence().findByPrimaryKey(IDQLKT_NguoiDung);
    }

    /**
    * Returns the nguoi dung with the primary key or returns <code>null</code> if it could not be found.
    *
    * @param IDQLKT_NguoiDung the primary key of the nguoi dung
    * @return the nguoi dung, or <code>null</code> if a nguoi dung with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public static qldc.pm.qlktcsdldc.model.NguoiDung fetchByPrimaryKey(
        long IDQLKT_NguoiDung)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().fetchByPrimaryKey(IDQLKT_NguoiDung);
    }

    /**
    * Returns all the nguoi dungs.
    *
    * @return the nguoi dungs
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<qldc.pm.qlktcsdldc.model.NguoiDung> findAll()
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findAll();
    }

    /**
    * Returns a range of all the nguoi dungs.
    *
    * <p>
    * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link qldc.pm.qlktcsdldc.model.impl.NguoiDungModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
    * </p>
    *
    * @param start the lower bound of the range of nguoi dungs
    * @param end the upper bound of the range of nguoi dungs (not inclusive)
    * @return the range of nguoi dungs
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<qldc.pm.qlktcsdldc.model.NguoiDung> findAll(
        int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findAll(start, end);
    }

    /**
    * Returns an ordered range of all the nguoi dungs.
    *
    * <p>
    * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link qldc.pm.qlktcsdldc.model.impl.NguoiDungModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
    * </p>
    *
    * @param start the lower bound of the range of nguoi dungs
    * @param end the upper bound of the range of nguoi dungs (not inclusive)
    * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
    * @return the ordered range of nguoi dungs
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List<qldc.pm.qlktcsdldc.model.NguoiDung> findAll(
        int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findAll(start, end, orderByComparator);
    }

    /**
    * Removes all the nguoi dungs from the database.
    *
    * @throws SystemException if a system exception occurred
    */
    public static void removeAll()
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence().removeAll();
    }

    /**
    * Returns the number of nguoi dungs.
    *
    * @return the number of nguoi dungs
    * @throws SystemException if a system exception occurred
    */
    public static int countAll()
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().countAll();
    }

    public static NguoiDungPersistence getPersistence() {
        if (_persistence == null) {
            _persistence = (NguoiDungPersistence) PortletBeanLocatorUtil.locate(qldc.pm.qlktcsdldc.service.ClpSerializer.getServletContextName(),
                    NguoiDungPersistence.class.getName());

            ReferenceRegistry.registerReference(NguoiDungUtil.class,
                "_persistence");
        }

        return _persistence;
    }

    /**
     * @deprecated As of 6.2.0
     */
    public void setPersistence(NguoiDungPersistence persistence) {
    }
}
